package com.example.composedemo.widget

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Email
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Preview
@Composable
fun RowTest() {
    Surface(
        shape = RoundedCornerShape(8.dp),
        modifier = Modifier
            .padding(horizontal = 18.dp)
            .fillMaxSize(),
        tonalElevation = 10.dp,
    ) {
        Column(
            modifier = Modifier.padding(12.dp)
        ) {
            Text(text = "Jetpack Compose", style = MaterialTheme.typography.headlineMedium)
            Spacer(modifier = Modifier.height(14.dp))
            Text(text = "Jetpack Compose是一个现代化的UI工具包，用于构建原生应用程序。")
            Row(
                modifier = Modifier.fillMaxWidth(),
                horizontalArrangement = Arrangement.SpaceBetween
            ) {
                Icon(Icons.Filled.Favorite, contentDescription = null)
                Icon(Icons.Filled.Email, contentDescription = null)
                Icon(Icons.Filled.Share, contentDescription = null)
            }
        }
    }
}